Returns the name of the weekday, based on the specified day.
#include <Date.au3>
_DateDayOfWeek ( $iDayNum [, $iFormat] )
Parameters
$iDayNum | Day number (1 = Sunday, 7 = Saturday). |
$iFormat | Optional - Format: 0 = Long name of the weekday. 1 = Abbreviated name of the weekday. |
Return Value
Success: | Returns the name of the given weekday. |
Failure: | Returns an empty string. |
@Error: | 0 = No error. |
1 = Invalid day number or format. |
Remarks
This function returns English day names only.
Related
_DateDaysInMonth
Example
#include <Date.au3>
; Retrieve the long name
$sLongDayName = _DateDayOfWeek( @WDAY )
; Retrieve the abbreviated name
$sShortDayName = _DateDayOfWeek( @WDAY, 1 )
MsgBox( 4096, "Day of Week", "Today is: " & $sLongDayName & " (" & $sShortDayName & ")" )